# -*- coding: utf-8 -*-
'''
Created on 2011-3-11

@author: Holmes2
'''
import os
import cPickle as p

def sub_(account,sum):
    dir0="D:\Program Files\Apache2.2\htdocs\py\Orderbook_2.0\data"
    dir=dir0+'\\'+account  
    os.chdir(dir)

    infofile='Per_info.data'
    f = file(infofile)
    Per_info = p.load(f)

    Per_info[3]-=sum

    f = file(infofile, 'w')
    p.dump(Per_info, f) 
    f.close()

    os.chdir(dir0)